home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / sml_nj / 93src.lha / src / runtime / cstack.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-09  |  1009 b   |  35 lines

  1. /* 
  2.  * COPYRIGHT (c) 1990 by AT&T Bell Laboratories.
  3.  *
  4.  * cstack.h
  5.  *
  6.  * when we are in ML code there is a C stack frame allocated.  this file
  7.  * defines the contents of that frame.  this is different for each
  8.  * architecture.  right now i only put HPPA in here because i don't want to
  9.  * mess with other files, but they should prob be moved in too.
  10.  */
  11.  
  12. #ifdef HPPA
  13. /* space for
  14.    C-callee save regs r3-r18    16
  15.    locals: mlstate...            5
  16.    C-caller save regs r8-r11     4
  17.    other mul/div things to save  
  18.    but must be 0 mod 64, so make it 192 */
  19.  
  20. #define ml_framesize     192
  21.  
  22. /* some magic HP stuff at beginning of frame */
  23. #define mlstate_offset   -36
  24. #define startgc_offset   -40
  25. #define mul_offset       -44
  26. #define div_offset       -48
  27. #define cvti2d_offset    -52
  28. #define callersave_offset(i) -68+(i-8)*4
  29. #define othersave_offset(i)  -92+i*4
  30. /* some space left in stack frame here */
  31. #define c_reg_offset(i)  -ml_framesize+(i-3)*4
  32. /* end of frame */
  33. #define rp_offset        -20
  34. #endif
  35.